package org.zl.mybatis.use.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.zl.mybatis.use.dto.GetByIdDTO;
import org.zl.mybatis.use.dto.UpdateCompanyDTO;
import org.zl.mybatis.use.vo.CompanyVO;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;

/**
 * 公司接口
 * @author ben
 * @date 2021-11-25 20:19:37 CST
 */
@RestController
@RequestMapping(value="/api/company")
@Api(tags = {"公司接口"})
@Slf4j
public class ComponyController {

	@ApiOperation(value = "1、根据ID查询公司")
	@ApiImplicitParams(
			@ApiImplicitParam(name = "id", value="公司ID", paramType = "query", required=true)
			)
	@GetMapping(value = "/getById")
	public CompanyVO getById(@RequestParam Integer id) {
		// TODO
		return null;
	}
	
	@ApiOperation(value = "2、根据ID查询公司（DTO）")
	@GetMapping(value = "/getById/dto")
	public CompanyVO getById(GetByIdDTO dto) {
		// TODO
		return null;
	}
	
	@ApiOperation(value = "3、根据ID更新公司")
	@PostMapping(value="/update")
	public Integer updateCompany(@RequestBody UpdateCompanyDTO dto) {
		return null;
	}
	
}
